home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / octa209s.zip / octave-2.09 / libs / pnm / oct-img.h < prev    next >
C/C++ Source or Header  |  1997-02-02  |  2KB  |  73 lines

  1. /*
  2. *******************************************************************************
  3. ** Header for Octave/2 Image processing                                      **
  4. ** (c) 1997, Klaus Gebhardt, 1997                                            **
  5. *******************************************************************************
  6. */
  7.  
  8. #ifndef _OCT_IMG_H
  9. #define _OCT_IMG_H
  10.  
  11. typedef int           BOOL;    /* Boolean type   */
  12. typedef unsigned char UCHAR;   /* Colormaps      */
  13. typedef short         SHORT;   /* Bits per Pixel */
  14. typedef int           INT;     /* Colours        */
  15. typedef unsigned int  UINT;    /* Sizes          */
  16. typedef double        OCTAVE;  /* Octaves type   */
  17.  
  18. #define OCT_BLACKWHITE 0
  19. #define OCT_GREY       1
  20. #define OCT_RGB        2
  21.  
  22. #if defined (__cplusplus)
  23. #include <octave/config.h>
  24. #include <octave/variables.h>
  25.  
  26. UCHAR **gif_colormap (octave_value, INT *, BOOL *);
  27. INT   **gif_pixels   (octave_value, INT, UINT *, UINT *);
  28.  
  29. Matrix oct_colormap (UCHAR **, INT, INT);
  30. Matrix oct_pixels   (INT **, INT, UINT, UINT);
  31. #endif
  32.  
  33. #if defined (__cplusplus)
  34. extern "C" {
  35. #endif
  36.  
  37. #ifndef max
  38. #define max(a,b)             (((a) > (b)) ? (a) : (b))
  39. #endif
  40. #ifndef min
  41. #define min(a,b)             (((a) < (b)) ? (a) : (b))
  42. #endif
  43.  
  44.   /* Windows und OS/2 Bitmaps */
  45. #define BMP_MAXCOLORS  256
  46. #define BMP_WIN          1
  47. #define BMP_OS2          2
  48.  
  49.   BOOL BMP_Encode (FILE *, INT, UINT, UINT, INT **, INT, UCHAR **);
  50.   BOOL BMP_Decode (FILE *, UINT *, UINT *, INT *, INT *, UCHAR ***, INT ***);
  51.  
  52.   /* PNM format */
  53. #define PPM_MAXVAL   255
  54. #define PPM_TYPE       'P' * 256 + '3'
  55. #define RPPM_TYPE      'P' * 256 + '6'
  56. #define PGM_MAXVAL   255
  57. #define PGM_TYPE       'P' * 256 + '2'
  58. #define RPGM_TYPE      'P' * 256 + '5'
  59. #define PBM_MAXVAL     1
  60. #define PBM_TYPE       'P' * 256 + '1'
  61. #define RPBM_TYPE      'P' * 256 + '4'
  62.  
  63.   BOOL PNM_Encode (FILE *, INT, UINT, UINT, INT **, INT, UCHAR **);
  64.   BOOL PNM_Decode (FILE *, UINT *, UINT *, INT *, INT *, UCHAR ***, INT ***);
  65.  
  66.   /* Postscript */
  67.   BOOL PS_Encode (FILE *, INT, UINT, UINT, INT **, INT, UCHAR **);
  68. #if defined (__cplusplus)
  69. }
  70. #endif
  71.  
  72. #endif
  73.